package bomberman.runable;

import java.util.List;

import bomberman.model.Flame;
import bomberman.util.Constants;

/**
 * 火焰线程，控制火焰自动消失
 * @author EX-FUHUICHAO001
 * 2016年9月23日11:26:12
 */
public class MyRunableFlame implements Runnable {

	private List<Flame> flames;
	
	public MyRunableFlame(List<Flame> flames){
		this.flames = flames;
	}
	
	public void run() {
		try {
			Thread.sleep(Constants.FLAME_SLEEP_TIME);
			for(Flame flame : flames){
				flame.removeFlame();
			}
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}

	
	
	public List<Flame> getFlames() {
		return flames;
	}

	public void setFlames(List<Flame> flames) {
		this.flames = flames;
	}
	
}
